/**
 * Created by xht on 2017/2/13.
 */




define(['jquery','bootstrap','layer', window._sys_config.require_config.baseUrl+'js/common.js'],function($){

    var page=1;
    function ajax() {

        page = page + 1;
        var baseUrl = window.location.href;
        console.log(baseUrl);

        if(baseUrl.indexOf("index.html") ==-1){
            baseUrl = baseUrl +"index.html";
        }
        var url = baseUrl.replace("index.html","index_"+page+'.json');
        console.log(url);
        $.ajax({
            type: "GET",
            url: url,
            dataType: "html",
            success: function (data) {
                console.log(data);
                $(".contents li:last").after(data);
            },
            error: function (data) {
                /*$(".contents li:last").after('<p class="bottom-p">已经到底了</p>');*/
                $(".bottom-p").css("display","block");
                is_end = true;
            }

        });
    }

});